package com.qianye.service.impl;


import com.qianye.entity.Conversation;
import com.qianye.service.ConversationBizService;
import com.qianye.service.ConversationCoreService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * (Conversation)表服务实现类
 *
 * @author makejava
 * @since 2024-09-16 23:09:32
 */
@Service("conversationBizService")
public class ConversationBizServiceImpl implements ConversationBizService {
    @Resource
    private ConversationCoreService conversationCoreService;

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    @Override
    public Conversation queryById(Long id) {
        return this.conversationCoreService.queryById(id);
    }

    /**
     * 分页查询
     *
     * @param conversation 筛选条件
     * @param pageRequest  分页对象
     * @return 查询结果
     */
    @Override
    public Page<Conversation> queryByPage(Conversation conversation, PageRequest pageRequest) {
        return this.conversationCoreService.queryByPage(conversation, pageRequest);
    }

    /**
     * 新增数据
     *
     * @param conversation 实例对象
     * @return 实例对象
     */
    @Override
    public Conversation insert(Conversation conversation) {
        return this.conversationCoreService.insert(conversation);
    }

    /**
     * 修改数据
     *
     * @param conversation 实例对象
     * @return 实例对象
     */
    @Override
    public Conversation update(Conversation conversation) {
        return this.conversationCoreService.update(conversation);
    }

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    @Override
    public boolean deleteById(Long id) {
        return this.conversationCoreService.deleteById(id);
    }
}
